1. Field of the Invention
The present invention relates to a method and apparatus for detecting a defect on a surface of a to-be-checked sheet on which images such as letters, patterns, and the like are cyclically printed in the longitudinal direction.
2. Description of the Related Art
For example, images such as letters (e.g., a hospital's name) and patterns are printed on a sheet for packing a drug by a printing cylinder Thus, images are cyclically formed on the surface of an elongated sheet in its longitudinal direction.
In the manufacture of the sheet material described above, surface defects such as attachment of foreign matters, contamination, pinholes, irregular printing, wrinkles, or the like may occur on the surface of the sheet material.
When a countermeasure is taken against the surface defects, the defects must be detected. In a conventional method, in order to detect the defects, a sheet material of, e.g., a transparent film, on which an image is printed in a color such as milk white is imaged by a camera incorporating a CCD image sensor, and an image signal output from the image sensor is signal-processed. The defects are detected based on the image signal obtained in this manner. In the conventional method, when the detection level of a defect detected by the camera is higher than the detection level of a printed image, the detection level of the camera is determined at an intermediate level between the image detection level and the defect detection level so that the image detection level does not adversely affect the defect detection level.
In the conventional method, when an image has a dark color tone such as black:, red, blue, and the like, the image detection level becomes equal to or higher than the defect detection level Thus, an image is detected as a defect.
In order to eliminate the above drawback, the arrangement sizes and positions of images are measured, and a mask range of a block larger than an image and independent from an outline of each image, e.g., a range extending along a travel direction of a sheet material for each printed character string or extending along the widthwise direction of the sheet material, or an island range, is determined. This range is stored in a memory. During defect detection, the mask range is read out from the memory, and an image detection signal corresponding to this range is masked Thus, a defect on a ground portion of the sheet material on which an image detection signal does not adversely affect image detection can be detected.
With the block masking method, the step of measuring image arrangement sizes and image positions and the step of storing the mask range in the memory are cumbersome. For this reason, when an image is complicated, or when a large number of types of sheet materials are to be subjected to defect detection, the block masking method is not suitable When an image is obliquely printed on the surface of the sheet material, it is found that the mask range cannot be determined. Since a block mask range is determined, portions for which defect detection cannot be performed, by using a background portion of a sheet material between adjacent characters as a starting point, are undesirably increased. When defect detection of such a sheet material is performed, a detection area is decreased, and detection reliability is impaired Since the image is masked and only the background portion of the sheet material is subjected to detection, defect detection of images cannot be performed